================================================================================
BUILDING MEGAZEUX ON MAC OS X
================================================================================

Before you can build Megazeux on Mac OS X, you must do the following:

* Install the Ogg framework
* Install the Vorbis framework
* Install the SDL framework
* Configure the Megazeux Xcode project file to suit your needs (optional)

This document will explain each of these steps in detail. Source code distributions for Ogg, Vorbis, and SDL can be obtained at the following URLs:

Ogg:	http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
Vorbis:	http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
SDL:	http://www.libsdl.org/release/SDL-1.2.11.tar.gz



================================================================================
Installing the Ogg framework
================================================================================

First, download the Ogg source code from the previously listed URL. Extract it to its own folder. Inside should be a folder named macosx. In macosx should be the Xcode project files for building Ogg. Open Ogg.xcodeproj.

We will need to make a few tweaks to the default settings. In the "Groups & Files pane", under "Targets," select "Ogg." Control-click on it and select "Get Info." Under the "Build" tab, make sure that the following are set properly:

Architectures:		ppc i386
Installation Directory:	@executable_path/../Frameworks

Now, close the dialog box. On the main window's toolbar, set "Active Build Configuration" to "Deployment". Click "Build" and cross your fingers.

If all went well, the Ogg framework has been compiled. Go back to the Finder and look for a folder titled "build" in the same directory as the Ogg Xcode project. In build/Deployment/, there should be a folder named Ogg.framework. Copy this to your /Library/Frameworks/ directory. The Ogg framework is now installed.



================================================================================
Installing the Vorbis framework
================================================================================

Installing the Vorbis framework is very similar to installing the Ogg framework. Download the Vorbis source and extract it to its own directory. Go to the macosx folder and open Vorbis.xcodeproj.

Open the "Get Info" dialog for Target "Vorbis". Make sure that "Architectures" and "Installation Directory" are set correctly.

Set "Active Build Configuration" to "Deployment" and click "Build". Find Vorbis.framework and put it in /Library/Frameworks/. The Vorbis framework should now be installed.


================================================================================
Installing the SDL framework
================================================================================

Installing the SDL framework is a bit different, but largely similar. Download the SDL source and extract it to its own directory, such as SDL-1.2.11/. Inside, there should be a file named Xcode.tar.gz. Extract that to SDL-1.2.11/Xcode/. The Xcode project file is located at SDL-1.2.11/Xcode/SDL/SDL.xcodeproj. Open it.

Set "Active Build Configuration" to "Deployment" and click "Build". Copy the resulting SDL.framework to /Library/Frameworks/. You have now installed the SDL framework.

If you experience trouble building the SDL framework, try building the target "Framework Without X11 Stuff (for those who didn't install the X11 headers with Xcode)".



================================================================================
Configuring the Megazeux Xcode file
================================================================================

The provided Xcode file is set up to build a Megazeux universal binary for Mac OS 10.4 (Tiger). If this is all you need, just open Megazeux.xcodeproj and click "Build." If you do not want a universal binary, you will need to make a few changes, depending on what you want:


For an Intel-only binary:
Select the Target "Megazeux" and bring up its "Get Info" dialog.
Change "Architectures" to "i386"

For a PowerPC-only binary:
Change "Architectures" to "ppc"

For a Panther binary:
Change "Architectures" to "ppc"
Change "SDK Path" to "/Developer/SDKs/MacOSX10.3.9.sdk"

For a Jaguar binary:
Change "Architectures" to "ppc"
Change "SDK Path" to "/Developer/SDKs/MacOSX10.2.8.sdk"
For some reason, GCC 4.0 can't be used to build a Jaguar binary. Click on the "Rules" tab and add a new rule: Process C source files using GCC 3.3


If you are missing one of the .sdk files, you can likely find it on one of the installation CDs that came with your computer. Keep in mind that if you are not compiling Megazeux on an Intel Mac with the latest version of Xcode, you may have to change the target's settings to get it to build, and you might not be able to build some of the configurations listed.

I have not personally tested all of these configurations - these are just the modifications that I would make. Any feedback would be welcome <christophermounce@gmail.com>.